package com.banyuan.controller;

import com.banyuan.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author yzt
 */
@Controller
@RequestMapping("/account")
public class AccountController {
    @Autowired
    private IAccountService accountService;

    @RequestMapping("/tran")
    @ResponseBody
    public String tran(Integer id1, Integer id2, Double money) {
        int tran = accountService.tran(id1, id2, money);
        return "转账成功";
    }
}
